package com.be.beadmin.material.entity;

import com.be.beadmin.basicData.entity.Organization;
import com.be.beadmin.common.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonBackReference;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

/**
 * @Author: Mengyang Zhu
 * @Date: 2023/4/16 21:05
 * @Description: 采购订单
 */


@Entity
@Table(name = "T_MM_PurchaseOrder")
@Getter
@Setter
public class PurchaseOrder extends BaseEntity {

    @Column(name = "erpOrderNo", columnDefinition = "VARCHAR(50) COMMENT 'ERP任务号' ")
    private String erpOrderNo;
    @Column(name = "so", columnDefinition = "VARCHAR(50) COMMENT '销售订单号' ")
    private String so;
    @Column(name = "soItem", columnDefinition = "VARCHAR(50) COMMENT '销售订单行' ")
    private String soItem;
    @Column(name = "projectName", columnDefinition = "VARCHAR(100) COMMENT '项目名称' ")
    private String projectName;

    @Column(name = "infoId", columnDefinition = "VARCHAR(100) COMMENT '项目id' ")
    private String infoId;
    //==PurchaseOrderDetail中的poItem
    @Column(name = "po", columnDefinition = "VARCHAR(50) COMMENT '采购订单号' ")
    private String po;
    @Column(name = "purchaseTime", columnDefinition = "datetime COMMENT '采购时间' ")
    private Date purchaseTime;
    @Column(name = "deliveryDate", columnDefinition = "datetime COMMENT '计划到货日期' ")
    private Date deliveryDate;
    @Column(name = "sendDate", columnDefinition = "datetime COMMENT '发货日期' ")
    private Date sendDate;
    @Column(name="purchaseEndDate",columnDefinition = "datetime COMMENT '实际到货日期' ")
    private Date purchaseEndDate;
    //开工日期==分料日期
    @Column(name = "kickoffDate", columnDefinition = "datetime COMMENT '开工日期' ")
    private Date kickoffDate;
    @Column(name = "supplier", columnDefinition = "VARCHAR(50) COMMENT '供应商名称' ")
    private String supplier;
    @Column(name = "purchaser", columnDefinition = "VARCHAR(50) COMMENT '采购员' ")
    private String purchaser;
    @Column(name = "purchaseAlerts", columnDefinition = "VARCHAR(1) COMMENT '采购预警' ")
    private String purchaseAlerts;
    @Column(name = "poState", columnDefinition = "VARCHAR(1) COMMENT '订单状态' ")
    private String poState;
    @Column(name = "isAudit", columnDefinition = "VARCHAR(1) COMMENT '审核标志' ")
    private String isAudit;
    @Column(name = "isClosed", columnDefinition = "VARCHAR(1) COMMENT '是否全部到货' ")
    private String isClosed;
    @Column(name = "memo", columnDefinition = "text COMMENT '备注' ")
    private String memo;
    //是否缺件；1==缺件
    @Column(name = "isShort",columnDefinition = "VARCHAR(1) default 0 COMMENT '是否缺件'")
    private String isShort;

}
